local qiuxian_active = fk.CreateSkill{
  name = "#hanqing__qiuxian_active",
}

Fk:loadTranslationTable{
  ["#hanqing__qiuxian_active"] = "求贤",
  ["hanqing__qiuxian1"] = "重铸所有牌",
  ["hanqing__qiuxian2"] = "重铸两张红色牌",
  ["hanqing__qiuxian3"] = "重铸一张装备牌",
}

qiuxian_active:addEffect("active", {
  min_card_num = 0,
  target_num = 0,
  interaction = UI.ComboBox {choices = { "hanqing__qiuxian1", "hanqing__qiuxian2", "hanqing__qiuxian3" }},
  card_filter = function(self, player, to_select, selected)
    if self.interaction.data == "hanqing__qiuxian1" then
      return false
    elseif self.interaction.data == "hanqing__qiuxian2" then
      return #selected < 2 and Fk:getCardById(to_select).color == Card.Red
    elseif self.interaction.data == "hanqing__qiuxian3" then
      return #selected == 0 and Fk:getCardById(to_select).type == Card.TypeEquip
    end
  end,
  feasible = function (self,  player, selected, selected_cards)
    if self.interaction.data == "hanqing__qiuxian1" then
      return #selected_cards == 0
    elseif self.interaction.data == "hanqing__qiuxian2" then
      return #selected_cards == 2
    elseif self.interaction.data == "hanqing__qiuxian3" then
      return #selected_cards == 1
    end
  end,
})

return qiuxian_active
